import "package:ct_pa_majordomo/pages/apartment/add_apartment/index.dart";
import "package:ct_pa_majordomo/pages/apartment/add_floor/index.dart";
import "package:ct_pa_majordomo/pages/apartment/associated_devices/index.dart";
import "package:ct_pa_majordomo/pages/apartment/associated_devices/widgets/associate_unbind_devices/index.dart";
import "package:ct_pa_majordomo/pages/apartment/check_in/index.dart";
import "package:ct_pa_majordomo/pages/apartment/edit_remark/index.dart";
import "package:ct_pa_majordomo/pages/apartment/room_detail/index.dart";
import "package:ct_pa_majordomo/pages/apartment/room_detail/widgets/check_in_record/index.dart";
import "package:ct_pa_majordomo/pages/apartment/room_detail/widgets/unlock_record/index.dart";
import "package:ct_pa_majordomo/pages/apartment/unlock_permission/add_permission/index.dart";
import "package:ct_pa_majordomo/pages/apartment/unlock_permission/get_pwd_key/index.dart";
import "package:ct_pa_majordomo/pages/apartment/unlock_permission/index.dart";
import "package:ct_pa_majordomo/pages/apartment/unlock_permission/permission_list/index.dart";
import "package:ct_pa_majordomo/pages/apartment/unlock_permission/send_key/index.dart";
import "package:ct_pa_majordomo/router/keys.dart";
import "package:flutter/material.dart";

class ApartmentRoutes {
  static Map<String, WidgetBuilder> getRoutes(BuildContext context) {
    return {
      ///房源 新增房源
      Keys.APARTMENT_ADD: (context, {arguments}) => const AddApartment(),
      ///房源 新增房源
      Keys.APARTMENT_FLOORS_ADD: (context, {arguments}) => const AddFloor(),
      ///房源 房间详情
      Keys.APARTMENT_ROOM_DETAIL: (context, {arguments}) => RoomDetail(info: arguments["info"], room: arguments["room"],),
      ///房源 房间详情 编辑备注
      Keys.APARTMENT_EDIT_REMARK: (context, {arguments}) => EditRemark(remark: arguments),
      ///房源 房间详情 开门记录
      Keys.APARTMENT_UNLOCK_RECORD: (context, {arguments}) => UnlockRecord(roomId: arguments,),
      ///房源 房间详情 入住记录
      Keys.APARTMENT_CHECK_IN_RECORD: (context, {arguments}) => CheckInRecord(roomId: arguments,),

      ///房源 关联设备
      Keys.APARTMENT_ASSOCIATED_DEVICES: (context, {arguments}) => AssociatedDevices(roomId: arguments["roomId"], roomName: arguments["roomName"], buildingName: arguments["buildingName"],),
      ///房源 关联设备 门锁
      Keys.APARTMENT_ASSOCIATED_DEVICES_LOCK: (context, {arguments}) => AssociateUnbindDevices(type: arguments["type"], roomId: arguments["roomId"], roomName: arguments["roomName"], buildingName: arguments["buildingName"], deviceType: arguments["deviceType"],),

      ///房源 办理入住
      Keys.APARTMENT_CHECK_IN: (context, {arguments}) => CheckIn( room: arguments, ),

      ///房源 开门权限
      Keys.APARTMENT_UNLOCK_PERMISSION: (context, {arguments}) => UnlockPermission(roomInfo: arguments,),
      ///房源 开门权限 发送钥匙
      Keys.APARTMENT_UNLOCK_PERMISSION_SEND_KEY: (context, {arguments}) => SendKey(roomId: arguments["roomId"], renter: arguments["renter"],),
      ///房源 开门权限 获取密码
      Keys.APARTMENT_UNLOCK_PERMISSION_GET_PWD_KEY: (context, {arguments}) => GetPwdKey(roomId: arguments["roomId"], renter: arguments["renter"]),
      ///房源 开门权限 添加权限【IC卡/指纹】
      Keys.APARTMENT_UNLOCK_PERMISSION_ADD: (context, {arguments}) => AddPermission(type: arguments["type"], lockInfo: arguments["lockInfo"], renter: arguments["renter"], ),
      ///房源 开门权限 添加权限【IC卡/指纹】 列表
      Keys.APARTMENT_UNLOCK_PERMISSION_LIST: (context, {arguments}) => PermissionList(type: arguments["type"], roomId: arguments["roomId"], renter: arguments["renter"],),
    };
  }
}